#ifndef INCLUDE_GUARD_WXDOC85F34SKUN19VYMLGQBHTR6JZP0E27
#define INCLUDE_GUARD_WXDOC85F34SKUN19VYMLGQBHTR6JZP0E27

/*
 * integers.hpp
 * This file is part of norxx
 *
 * Copyright (C) 2014 - Sebastian Gesemann
 *
 * norxx is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * norxx is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with norxx. If not, see <http://www.gnu.org/licenses/>.
 */

#include <cstdint>

namespace util {

typedef std::uint8_t  u8;
typedef std::uint16_t u16;
typedef std::uint32_t u32;
typedef std::uint64_t u64;

template<int W> struct int_type;
template<> struct int_type< 8> { typedef u8  type; };
template<> struct int_type<16> { typedef u16 type; };
template<> struct int_type<32> { typedef u32 type; };
template<> struct int_type<64> { typedef u64 type; };

template<class T> struct bits;
template<> struct bits<u8 > { static const int value= 8; };
template<> struct bits<u16> { static const int value=16; };
template<> struct bits<u32> { static const int value=32; };
template<> struct bits<u64> { static const int value=64; };
template<class T> struct bits<const T> : bits<T> {};

} // namespace util

#endif
